﻿using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;


public class DoFManager : MonoBehaviour
{
    public DepthOfField dof;
    public Volume Volume;

    private void Start()
    {
        Volume.sharedProfile.TryGet(typeof(DepthOfField), out dof);
    }

    public void EnableDepthOfField()
    {
        if (dof)
        {
            dof.active = true;
        }
    }

    public void DisableDepthOfField()
    {
        if (dof)
        {
            dof.active = false;
        }
    }
}